<!DOCTYPE html>
<html class="no-js" lang="">

<head>
    #include( "/public-head.html")
</head>

<body >

<div class="main-content" >
    <div class="cms-index">
        <div class="index-app">
            <div id="carousel-example-generic" class="carousel slide text-center bordered bg-white round overflow-hidden" data-ride="carousel">
                <form id="headForm" action="/vrs/focus/save.jsn"  method="post">
                    <input class="hidden" name="focus.id" value="$!{indexHeadFocus.id}">
                    <input class="hidden" name="focus.focusName" value="$!{indexHeadFocus.focusName}">
                    <input class="hidden" name="focus.type" value="$!{indexHeadFocus.type}">
                    <input class="hidden" name="focus.subscribe" value="$!{indexHeadFocus.subscribe}">
                    <input class="hidden" name="focus.terminal" value="$!{indexHeadFocus.terminal}">
                    <input class="hidden" name="focus.data" value="$!{indexHeadFocus.data}">
                    <input class="hidden" name="focus.description" value="$!{indexHeadFocus.description}">
                    <input class="hidden" name="focus.displayOrder" value="$!{indexHeadFocus.displayOrder}">
                    <ol class="carousel-indicators" style="top: 120px;">
                        <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
                    </ol>
                    <div class="carousel-inner " role="listbox">
                        <div class="item active" >
                            <div data-toggle="modal" data-target=".bs-modal-sm">
                                <img src="/images/upload_1242x689.jpg" width="248" height="140" class="round" alt="First slide">
                                <div class="title-div"><span><p>2014纽约摩登天空音乐节纪录片</p><p>2015-09-25</p></span><span>观看全部视频</span></div>
                                <input  class="hidden data-json">
                            </div>
                            <button type="button" class="btn btn-danger focus-remove" >删<br/>除</button>
                        </div>
                    </div>
                </form>
            </div>
            <div class="cms-images">
                <form id="indexForm" action="/vrs/focus/save.jsn" method="post">
                    <input class="hidden" name="focus.id" value="$!{indexListFocus.id}">
                    <input class="hidden" name="focus.focusName" value="$!{indexListFocus.focusName}">
                    <input class="hidden" name="focus.type" value="$!{indexListFocus.type}">
                    <input class="hidden" name="focus.subscribe" value="$!{indexListFocus.subscribe}">
                    <input class="hidden" name="focus.terminal" value="$!{indexListFocus.terminal}">
                    <input class="hidden" name="focus.data" value="$!{indexListFocus.data}">
                    <input class="hidden" name="focus.description" value="$!{indexListFocus.description}">
                    <input class="hidden" name="focus.displayOrder" value="$!{indexListFocus.displayOrder}">
                    <ul id="indexList" class="sortable-list connectedSortable">
                        <li >
                            <div data-toggle="modal" data-target=".bs-modal-sm">
                                <img src="/images/upload_1242x416.jpg" class="add-video" width="248" height="82" >
                                <div class="gory">
                                    <div class="exc">独家</div>
                                </div>
                                <input  class="hidden data-json" />
                            </div>
                            <button type="button" class="btn btn-danger focus-remove" >删<br/>除</button>
                            <!--<div class="focus-remove"><i class="fa fa-remove"></i></div>-->
                        </li>
                    </ul>
                </form>
            </div>

            <div class="btn-div">
                <button type="button" class="btn btn-primary add" >添加首页</button>
                <button type="button" class="btn btn-primary add-head" >添加轮播</button>
                <button type="button" class="btn btn-primary save-focus" data-id="indexForm" >保存首页</button>
                <button type="button" class="btn btn-primary save-focus" data-id="headForm" >保存轮播</button>
            </div>
        </div>
        <!--直播-->
        <div class="index-app" style="height: 450px;">
            <div class="cms-images" style="height: 450px;">
                <form id="liveForm" action="/vrs/focus/save.jsn" method="post">
                    <input class="hidden" name="focus.id" value="$!{liveFocus.id}">
                    <input class="hidden" name="focus.focusName" value="$!{liveFocus.focusName}">
                    <input class="hidden" name="focus.type" value="$!{liveFocus.type}">
                    <input class="hidden" name="focus.subscribe" value="$!{liveFocus.subscribe}">
                    <input class="hidden" name="focus.terminal" value="$!{liveFocus.terminal}">
                    <input class="hidden" name="focus.data" value="$!{liveFocus.data}">
                    <input class="hidden" name="focus.description" value="$!{liveFocus.description}">
                    <input class="hidden" name="focus.displayOrder" value="$!{liveFocus.displayOrder}">
                    <ul id="liveList" class="sortable-list connectedSortable">
                        <li >
                            <div data-toggle="modal" data-target=".bs-modal-sm">
                                <img src="/images/upload_1242x416.jpg" class="add-video" width="248" height="82">
                                <div class="gory">
                                    <div class="exc">独家</div>
                                </div>
                                <input  class="hidden data-json" />
                            </div>
                        </li>
                    </ul>
                </form>
            </div>

            <div class="btn-div">
                <button type="button" class="btn btn-primary add" >添加直播</button>
                <button type="button" class="btn btn-primary save-focus" data-id="liveForm" >保存直播</button>
            </div>
        </div>
        <!--直播-->
        <!--秀场-->
        <div class="index-app" style="height: 450px;">
            <div class="cms-images" style="height: 450px;">
                <form id="showForm" action="/vrs/focus/save.jsn" method="post">
                    <input class="hidden" name="id" value="$!{showFocus.id}">
                    <input class="hidden" name="focus.focusName" value="$!{showFocus.focusName}">
                    <input class="hidden" name="focus.type" value="$!{showFocus.type}">
                    <input class="hidden" name="focus.subscribe" value="$!{showFocus.subscribe}">
                    <input class="hidden" name="focus.terminal" value="$!{showFocus.terminal}">
                    <input class="hidden" name="focus.data" value="$!{showFocus.data}">
                    <input class="hidden" name="focus.description" value="$!{showFocus.description}">
                    <input class="hidden" name="focus.displayOrder" value="$!{showFocus.displayOrder}">
                    <ul id="showList" class="sortable-list connectedSortable">
                        <li >
                            <div data-toggle="modal" data-target=".bs-modal-sm">
                                <img src="/images/upload_1242x416.jpg" class="add-video" width="248" height="82">
                                <div class="gory">
                                    <div class="exc">独家</div>
                                </div>
                                <input  class="hidden data-json" />
                            </div>
                        </li>
                    </ul>
                </form>
            </div>

            <div class="btn-div">
                <button type="button" class="btn btn-primary add" >添加秀场</button>
                <button type="button" class="btn btn-primary save-focus" data-id="showForm" >保存秀场</button>
            </div>
        </div>
        <!--秀场-->
        <!--操作-->
        <div class="index-app" style="height: 450px;width: 50px;">
            <button type="button" class="btn btn-info btn-sm btn-icon mr5" data-url="/vrs/focus/index/3.html">
                <i class="fa fa-spinner"></i>
                <span>刷新</span>
            </button>
        </div>
        <!--操作-->
    </div>

</div>

<!-- /main area -->
<!--modal-->
#parse("/vrs/cms/modal.html")
<!--modal-->
#include( "/public-script.html")
#include( "/sub-script.html")

<script type="text/javascript">
    $('.sortable-list').sortable({
        placeholder: 'ui-state-highlight',
        connectWith: '.connectedSortable'
    }).disableSelection();
    //加载轮播数据
    initEditHead('carousel-example-generic','$!{indexHeadFocus.data}');
    $.getJSON("/scripts/cms/category.json",function(data){
        //加载首页列表数据
        initEditIndexList('indexList','$!{indexListFocus.data}',data);
        //加载直播列表数据
        initEditIndexList('liveList','$!{liveFocus.data}',data);
        //加载秀场数据
        initEditIndexList('showList','$!{showFocus.data}',data);
    })


</script>
<!--sorttable-->

</body>

</html>
<!--
//首页轮播数据
    $.get("/vrs/focus/index.jsn",{type:1,subscribe:0,terminal:3},function(data,textStatus){
        //data     返回的内容，xml,json,html文档
        //textStatus     请求状态：success/error/notmodified/timeout
        if(textStatus == "success"){
            var success = data.success;
            if(success){
//                initEditHead('carousel-example-generic',data.data.data);
            }
        }
    },"json");
//首页列表数据
        $.get("/vrs/focus/index.jsn",{type:1,subscribe:2,terminal:3},function(data,textStatus){
            //data     返回的内容，xml,json,html文档
            //textStatus     请求状态：success/error/notmodified/timeout
            if(textStatus == "success"){
                var success = data.success;
                if(success){
//                    initEditIndexList('indexList',data.data.data,data);
                }
            }
        },"json");
        //直播数据
        $.get("/vrs/focus/index.jsn",{type:100,subscribe:2,terminal:3},function(data,textStatus){
            //data     返回的内容，xml,json,html文档
            //textStatus     请求状态：success/error/notmodified/timeout
            if(textStatus == "success"){
                var success = data.success;
                if(success){
//                    initEditIndexList('liveList',data.data.data,data);
                }
            }
        },"json");
        //秀场数据
        $.get("/vrs/focus/index.jsn",{type:2,subscribe:2,terminal:3},function(data,textStatus){
            //data     返回的内容，xml,json,html文档
            //textStatus     请求状态：success/error/notmodified/timeout
            if(textStatus == "success"){
                var success = data.success;
                if(success){
//                    initEditIndexList('showList',data.data.data,data);
                }
            }
        },"json");

-->